import http from '@/utils/axios';

// 获取版本列表
export const getVersionList = (params: any) => {
    return http({
        method: 'get',
        url: '/version/index',
        params,
    });
};

// 获取版本详情信息
export const getVersionInfo = (userId: number) => {
    return http({
        method: 'GET',
        url: `/version/read/${userId}`,
    });
};

// 新增版本信息
export const saveVersionInfo = (data: any) => {
    return http({
        method: 'POST',
        url: `/version/save`,
        data,
    });
};

// 更新版本信息
export const updateVersionInfo = (userId: number, data: any) => {
    return http({
        method: 'PUT',
        url: `/version/update/${userId}`,
        data,
    });
};

// 删除版本
export const deleteVersion = (userId: number) => {
    return http({
        method: 'DELETE',
        url: `/version/delete/${userId}`,
    });
};